package com.sq.es.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Li sir
 * @Date 2024/1/4
 */

@Data
@Configuration
@ConfigurationProperties(prefix = "elasticsearch")
public class ElasticSearchConfig {


    public int trackTotalHitsUp = Integer.MAX_VALUE;


    public int maxSearchNum = 1000000;


    private String url = "127.0.0.1";


    private Integer port = 9200;

    /**
     * 最大连接数量
     */
    private int maxConnectNum = 30;

    /**
     * 默认连接数量
     */
    private int defaultConnectNum = 10;


    /**
     * 最小等待时间
     */
    private int minWaitTime = 2000;

    /**
     * 最大等待时间
     */
    private int maxWaitTime = 5000;

    /**
     * 最大存储数量
     */
    private int maxStorage = 100;

}
